		<ui:composition template="/WEB-INF/templates/main-template.xhtml"
		xmlns="http://www.w3.org/1999/xhtml"
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:p="http://primefaces.org/ui" >
		
		<ui:define name="sidebar">
			<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
		</ui:define>
		<ui:define name="content">
		<h:form id="createDomesticProjectAssignmentForm" >
		<p:growl></p:growl>
		<h:outputText value="#{msg['createprojectassinmentdomestic.lable.heading']}" styleClass="outputTextTitle" style="font-weight: bold; color: #7892B7"/>
		<br />
		<br />
		<p:panel header="#{msg['employeedetails.label']}"  style="border: 1px solid #d9d9d9; width:95%"> 
		<h:panelGrid columns="7" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="border: 1px solid #d9d9d9; background-color: #FFE4C4;  border: 1px solid #F5AD66; width:100%" cellspacing="5">
		
		<h:outputLabel value="#{msg['projectassignmentid.lable']}"/>
		<h:outputLabel value=" : " />
		<p:inputText  value="#{createDomesticProjectAssignmentBean.projectAssignmentCode}"  readonly="true"/>
		<h:inputHidden  />
		<h:outputLabel value="#{msg['createdate.label']}" />
		<h:outputLabel value=" : " />
		<p:calendar pattern="dd/MM/yyy" value="#{createDomesticProjectAssignmentBean.createDate}"  showButtonPanel="true"/>
		 	
		
		<h:outputLabel value="#{msg['employeeid.label']}"/>
		<h:outputLabel value=" : " />
		<p:inputText value="#{createDomesticProjectAssignmentBean.employeeId}"  readonly="true"/> 
		<h:inputHidden  />
		<h:outputLabel value="#{msg['employeename.label']}"/>
		<h:outputLabel value=" : " />
		<p:inputText value="#{createDomesticProjectAssignmentBean.employee.firstName} #{createDomesticProjectAssignmentBean.employee.lastName} "  readonly="true"/>
	
		<h:outputLabel value="#{msg['contactnumber.label']}"/>
		<h:outputLabel value=" : " />
		<p:inputText value="#{createDomesticProjectAssignmentBean.contactNumber}" readonly="true" />
		<h:inputHidden  />
		<h:outputLabel value="#{msg['emergenceycontactnum.label']}"/>
		<h:outputLabel value=" : " />
		<p:inputMask value="#{createDomesticProjectAssignmentBean.projectAssignment.emergencycontactNumber}" mask="(999) 999-9999"/>
		 
		<h:outputLabel value="#{msg['approvedby.lable']}"/>
		<h:outputLabel value=" : " />
		<p:inputText value="#{createDomesticProjectAssignmentBean.approvedBy}" readonly="true"/> 
		
		</h:panelGrid>
	</p:panel>
		<p:panel header="#{msg['assignmentdetails.label']}"   style="border: 1px solid #d9d9d9; width:95%"> 
		<h:panelGrid columns="7" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1"  
					 style=" width:100%" cellspacing="5">
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputText value="Choose Project" />
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:selectOneMenu value="#{createDomesticProjectAssignmentBean.selectedProjectId}" style="width:140px;">
		<f:selectItem itemLabel="Select a Project " itemValue="" />
		<f:selectItems value="#{createDomesticProjectAssignmentBean.projectsMap}" />
	 	<p:ajax event="change" listener="#{createDomesticProjectAssignmentBean.projectChangeListener}" update="projectName,clientAddress,client,clientLocation,contactPerson,contactNumber,periodFrom,periodTo,recommendedBy"/>
		</p:selectOneMenu>
	    <h:inputHidden />
	    <h:outputLabel value="#{msg['recommendedby.lable']}"/>
		<h:outputLabel value=" : " />
		<p:inputText id="recommendedBy" value="#{createDomesticProjectAssignmentBean.selectedProject.owner.firstName} #{createDomesticProjectAssignmentBean.selectedProject.owner.lastName}" readonly="true" />					
		
		<h:panelGroup>
		<p:spacer></p:spacer>
		<p:spacer></p:spacer>
		<h:outputLabel value="#{msg['projectname.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputText id="projectName" value="#{createDomesticProjectAssignmentBean.selectedProject.projectName}" readonly="true"/>
		<h:inputHidden  /> 					 	
		<h:outputLabel value="#{msg['clientaddress.label']}"/>
		<h:outputLabel value=" : " />
		<p:inputText id="clientAddress" value="#{createDomesticProjectAssignmentBean.selectedProject.clientAddress}" readonly="true" />
		
		<h:panelGroup>
		<p:spacer></p:spacer>
		<p:spacer></p:spacer>
		<h:outputLabel value="#{msg['clientname.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputText  id="client" value="#{createDomesticProjectAssignmentBean.selectedProject.client}" readonly="true"/>
		<h:inputHidden  />
		<h:outputLabel value="#{msg['clientlocation.label']}"/>
		<h:outputLabel value=" : " />
		<p:inputText  id="clientLocation" value="#{createDomesticProjectAssignmentBean.selectedProject.clientLocation}" readonly="true"/>
		
		<h:panelGroup>
		<p:spacer></p:spacer>
		<p:spacer></p:spacer>
		<h:outputLabel value="#{msg['clientcontactperson.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputText id="contactPerson" value="#{createDomesticProjectAssignmentBean.selectedProject.contactPerson}" readonly="true" />
		<h:inputHidden  />
		<h:outputLabel value="#{msg['clientcontactnumber.lable']}"/>
		<h:outputLabel value=" : " />
		<p:inputText id="contactNumber" value="#{createDomesticProjectAssignmentBean.selectedProject.contactNumber}"  readonly="true"/>
		
		<h:panelGroup>
		<p:spacer></p:spacer>
		<p:spacer></p:spacer>
		<h:outputLabel value="#{msg['projectstratdate.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:calendar pattern="dd/MM/yyy" id="periodFrom" value="#{createDomesticProjectAssignmentBean.selectedProject.periodFrom}"/>
		<h:inputHidden  />
		<h:outputLabel value="#{msg['projectenddate.label']}"/>
		<h:outputLabel value=" : " />
		<p:calendar pattern="dd/MM/yyy" id="periodTo" value="#{createDomesticProjectAssignmentBean.selectedProject.periodTo}"/> 
		
		</h:panelGrid>
	 </p:panel>
	
		
		<p:panel header="#{msg['assignmentallowancedetails.label']}"   style="border: 1px solid #d9d9d9; width:95%"> 
		<h:panelGrid columns="7" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
				 style="width:100%" cellspacing="5">
		<h:panelGroup>		 
		<h:outputLabel value="*" style="color : red;"/>
		<h:outputLabel value="#{msg['dailyallowance.lable']}"/>
		</h:panelGroup>
		<h:panelGroup>	
		<h:outputLabel value=" : " />
		<p:inputMask id="dailyAllowance" mask="99999.99" value="#{createDomesticProjectAssignmentBean.projectAssignmentDetail.dailyAllowance}"  >
		<p:watermark for="dailyAllowance" value="00000.00" />
		</p:inputMask> 
		</h:panelGroup>
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;"/>
		<h:outputLabel value="#{msg['advanceamount.lable']}"/>
		</h:panelGroup>
		<h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputMask mask="99999.99" id="advanceAmount" value="#{createDomesticProjectAssignmentBean.projectAssignmentDetail.advanceAmount}">
	 	<p:watermark for="advanceAmount" value="00000.00" />
		<p:ajax event="change" listener="#{createDomesticProjectAssignmentBean.advanceAmountChangeListener}" update="totalAmount"/>
		</p:inputMask> 
		</h:panelGroup>
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;"/>
		<h:outputLabel value="#{msg['advanceamountbydate.lable']}"/>
		</h:panelGroup>
		<h:panelGroup>
		<h:outputLabel value=" : " />
		<p:calendar pattern="dd/MM/yyy" value="#{createDomesticProjectAssignmentBean.projectAssignmentDetail.advanceByDate}" showButtonPanel="true" />
		</h:panelGroup>
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;"/>
		<h:outputLabel value="#{msg['paymentcycle.lable']}"/>
		</h:panelGroup>
		<h:panelGroup>
		<h:outputLabel value=" : " />
		<p:calendar pattern="dd/MM/yyy" value="#{createDomesticProjectAssignmentBean.projectAssignmentDetail.paymentCycleDate}" showButtonPanel="true" />
		</h:panelGroup>
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;"/>
		<h:outputLabel value="Additionals"  />
		</h:panelGroup>
		<h:panelGroup>
		<h:outputLabel value=" : " />
		<p:selectOneMenu id="options" value="#{createDomesticProjectAssignmentBean.projectAssignmentDetail.additionals}"  style="width:140px;">
		 			<f:selectItem itemLabel="Select Additional"/>
		         	<f:selectItem itemLabel="By ERPandERP" itemValue="By ERPandERP"/>  
					<f:selectItem itemLabel="By Client" itemValue="By Client" />    
         </p:selectOneMenu>
	    </h:panelGroup>
		<h:inputHidden  />
	   	<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
	
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;"/>
		<h:outputLabel value="#{msg['roomrentadvance.lable']}"/>
		</h:panelGroup>
		<h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputMask mask="99999.99" id="roomRentAdvance" value="#{createDomesticProjectAssignmentBean.projectAssignmentDetail.roomRentAdvance}"  >
		<p:watermark for="roomRentAdvance" value="00000.00" />
		<p:ajax event="change" listener="#{createDomesticProjectAssignmentBean.roomRentAdvanceChangeListener}" update="totalAmount"/>
		</p:inputMask>
		</h:panelGroup>
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;"/> 
		<h:outputLabel value="#{msg['roomrentpermonth.lable']}"/>
		</h:panelGroup>
		<h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputMask mask="99999.99" id="roomRentPerMonth" value="#{createDomesticProjectAssignmentBean.projectAssignmentDetail.roomRentPerMonth}"  >
		<p:watermark for="roomRentPerMonth" value="00000.00" />
		</p:inputMask>
		</h:panelGroup>
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;"/>
		<h:outputLabel value="#{msg['totalamount.lable']}"/>
		</h:panelGroup>
		<h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputMask mask="99999.99" id="totalAmount" value="#{createDomesticProjectAssignmentBean.projectAssignmentDetail.totalAdvance}">
		<p:watermark for="totalAmount" value="00000.00" />
		</p:inputMask>
		</h:panelGroup>
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		<h:inputHidden  />
		
		</h:panelGrid>
		
		
    	
	</p:panel>
	<h:panelGrid columns="1" style=" width:95%">
		<h:panelGroup style="float:right;">
		<p:commandButton  type="button" id="submit" value="Submit" onclick="confirmation.show()" ajax="false" />
        <p:commandButton type="reset" value="Reset" /> 
    	</h:panelGroup> 
    
	
	</h:panelGrid>
	
	<p:confirmDialog widgetVar="confirmation" id="confirmation" severity="alert" message="Do you want to submit your new domestic project assignment?">
				<h:panelGroup style="text-align: right; float: right;">
					<p:commandButton value="Yes, Submit Now" actionListener="#{createDomesticProjectAssignmentBean.saveDomesticProjectAssignmentAction}" update="@form" oncomplete="confirmation.hide()"/>
					<p:commandButton id="decline" value="Not Yet" onclick="confirmation.hide()" type="button" />
				</h:panelGroup>
	</p:confirmDialog>
	
		</h:form>
</ui:define>
</ui:composition>
	
